home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / CSMP Digests / csmp-v1-046.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  45.1 KB  |  1,116 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Thu, 09 Apr 92       Volume 1 : Issue 46
  2.  
  3. Today's Topics:
  4.  
  5.     Bugs in Std. WDEF
  6.     stepping a floppy head
  7.     Macintosh speech recognition (was Re: Speech synthesis toolkit)
  8.     THINK C 5.0.2 project file bug - don't mix Systems 6 & 7
  9.     CMaster extension to THINK C
  10.     Think C Q: Mixing SF dialog and ANSI file IO
  11.     Window Storage?
  12.     Floating windows: How to implement? PLEASE HELP!
  13.     Advice for flickering text??
  14.  
  15.  
  16. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  17.  
  18. These digests are available (by using FTP, account anonymous, your email
  19. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  20. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  21. Questions list.
  22.  
  23. These digests are also available via email.  Just send a note saying that you
  24. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  25. automatically receive each new digest as it is created.
  26.  
  27. The articles in these digests are taken directly from comp.sys.mac.programmer.
  28. They are not edited; all articles included in this digest are in their original
  29. posted form.  The only articles that are -not- included in these digests are
  30. those which didn't receive any replies (except those that give information
  31. rather than ask a question).  All replies to each article are concatenated
  32. onto the original article in the order in which they were received.  Article
  33. threads are not added to the digests until the last article added to the
  34. thread is at least one month old (this is to ensure that the thread is dead
  35. before adding it to the digests).
  36.  
  37. Send administrative mail to mkelly@cs.uoregon.edu.
  38.  
  39. -------------------------------------------------------
  40.  
  41. From: reynhout@cs.uri.edu
  42. Subject: Bugs in Std. WDEF
  43. Organization: University of Rhode Island, Computer Science Dept.
  44. Date: Tue, 3 Mar 1992 09:29:27 GMT
  45.  
  46. In article <1992Mar2.171652.10362@midway.uchicago.edu> jcav@midway.uchicago.edu writes:
  47. >In article <IdgPdtK00WBNE58noS@andrew.cmu.edu> sc5h+@andrew.cmu.edu (Shawn James Cokus) writes:
  48. >>When DrawGrowIcon() is called for one of the standard document window
  49. >>types, everything is fine, except if the window that you pass
  50. >>DrawGrowIcon() has its left edge off the left edge of the screen; ie,
  51. >>the window has been dragged so that some of its content is off to the
  52. >>left.  In that case, the grow icon gets drawn one pixel too low.
  53. >
  54. >While reading the quoted message with my telnet program, I decided to move
  55. >the window off to the left and test for the behavior.  Sure enough, the
  56. >grow icon moved down one pixel.  You have very sharp eyes, Mr. Cokus.  ;-)
  57.  
  58.    I tried the same thing, but can't reproduce it.  
  59.  
  60. >System info:    SE/30, 8mb RAM, System 7.0.1<dot>, MODE-32 installed.
  61. >                telnet program was SU-MacIP 4.01
  62.  
  63.    Mine: Mac Plus, 4MB, 7.0<splat>.  Doesn't reproduce with any of the
  64.          applications I currently have open.
  65.  
  66.    Andrew
  67.  
  68.  
  69.    -=- 
  70.    Andrew <reynhout@cs.uri.edu>
  71.  
  72. - -------------------------
  73.  
  74. From: jcav@quads.uchicago.edu (JohnC)
  75. Date: 3 Mar 92 19:14:46 GMT
  76. Organization: The Royal Society for Putting Things on Top of Other Things
  77.  
  78. In article <1992Mar3.092927.5326@cs.uri.edu> reynhout@cs.uri.edu writes:
  79. >In article <1992Mar2.171652.10362@midway.uchicago.edu> jcav@midway.uchicago.edu writes:
  80. >>In article <IdgPdtK00WBNE58noS@andrew.cmu.edu> sc5h+@andrew.cmu.edu (Shawn James Cokus) writes:
  81. >>>When DrawGrowIcon() is called for one of the standard document window
  82. >>>types, everything is fine, except if the window that you pass
  83. >>>DrawGrowIcon() has its left edge off the left edge of the screen; ie,
  84. >>>the window has been dragged so that some of its content is off to the
  85. >>>left.  In that case, the grow icon gets drawn one pixel too low.
  86. >>
  87. >>While reading the quoted message with my telnet program, I decided to move
  88. >>the window off to the left and test for the behavior.  Sure enough, the
  89. >>grow icon moved down one pixel.  You have very sharp eyes, Mr. Cokus.  ;-)
  90. >
  91. >   I tried the same thing, but can't reproduce it.  
  92.  
  93. One thing to realize is that _MoveWindow is very smart and uses _CopyBits
  94. whenever possible, not asking the application to redraw anything unless
  95. absolutely necessary.  Try moving the window so that part of it is off the
  96. screen to the left _AND_ the grow-icon is off the bottom of the screen.
  97. Then move the window back up so that it remains partially off to the left
  98. but the grow-icon is revealed and redrawn.  That's the only way to make
  99. sure the WDEF will be called again under the suspicious circumstances.  I
  100. should have been more clear in my original response.  Also, I just tried it
  101. while editing this article and the grow-icon did indeed shift.  This time
  102. I'm using NCSA Telnet 2.4.02.
  103.  
  104. - -- 
  105. John Cavallino                  |  EMail: jcav@midway.uchicago.edu
  106. University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
  107. Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
  108. B0 f++ c+ g+ k s+(+) e+ h- pv   |         Chicago, IL  60637
  109.  
  110. - -------------------------
  111.  
  112. From: vvann@umbio.med.miami.edu (Vince Vann)
  113. Date: 3 Mar 92 22:52:41 GMT
  114. Organization: University of Miami Medical School
  115.  
  116. reynhout@cs.uri.edu writes:
  117.  
  118. >In article <1992Mar2.171652.10362@midway.uchicago.edu> jcav@midway.uchicago.edu writes:
  119. >>In article <IdgPdtK00WBNE58noS@andrew.cmu.edu> sc5h+@andrew.cmu.edu (Shawn James Cokus) writes:
  120. >>>When DrawGrowIcon() is called for one of the standard document window
  121. >>>types, everything is fine, except if the window that you pass
  122. >>>DrawGrowIcon() has its left edge off the left edge of the screen; ie,
  123. >>>the window has been dragged so that some of its content is off to the
  124. >>>left.  In that case, the grow icon gets drawn one pixel too low.
  125. >>
  126. >>While reading the quoted message with my telnet program, I decided to move
  127. >>the window off to the left and test for the behavior.  Sure enough, the
  128. >>grow icon moved down one pixel.  You have very sharp eyes, Mr. Cokus.  ;-)
  129.  
  130. Same thing happens on my SE/30 with 8 MB and running system 7.0.
  131.  
  132. - -- Vince <vvann@umbio.med.miami.edu>
  133. - -- 
  134.  
  135. - -------------------------
  136.  
  137. From: jwwalker@opusc.csd.scarolina.edu (Jim Walker)
  138. Organization: Univ. of S. Carolina, Department of Mathematics
  139. Date: Wed, 4 Mar 1992 01:56:21 GMT
  140.  
  141. In article <1992Mar3.092927.5326@cs.uri.edu> reynhout@cs.uri.edu writes:
  142. |>>When DrawGrowIcon() is called for one of the standard document window
  143. |>>types, everything is fine, except if the window that you pass
  144. |>>DrawGrowIcon() has its left edge off the left edge of the screen; ie,
  145. |>>the window has been dragged so that some of its content is off to the
  146. |>>left.  In that case, the grow icon gets drawn one pixel too low.
  147.  
  148. |   I tried the same thing, but can't reproduce it.  
  149.  
  150. |>System info:    SE/30, 8mb RAM, System 7.0.1<dot>, MODE-32 installed.
  151. |>                telnet program was SU-MacIP 4.01
  152. |
  153. |   Mine: Mac Plus, 4MB, 7.0<splat>.  Doesn't reproduce with any of the
  154. |         applications I currently have open.
  155.  
  156. I can reproduce it. SE/30, 7.0.1*.  Maybe this is strictly a 7.0.1 bug?
  157. Anyone see it on plain 7.0?  For those trying to reproduce it, note that
  158. you must not only put the left edge of a window off the screen, but also
  159. cause the window's grow icon to be updated.  For instance, deactivate and
  160. reactivate the window.
  161.  
  162.  
  163. - -- 
  164.   -- Jim Walker 76367.2271@compuserve.com  walkerj@math.scarolina.edu
  165.  
  166. - -------------------------
  167.  
  168. From: russotto@eng.umd.edu (Matthew T. Russotto)
  169. Date: Wed, 04 Mar 92 18:41:58 GMT
  170. Organization: University of Maryland, College Park, College of Engineering
  171.  
  172. In article <1992Mar4.015621.18821@opusc.csd.scarolina.edu> jwwalker@opusc.csd.scarolina.edu (Jim Walker) writes:
  173. >|> (Someone, attribution lost) writes
  174. >|>>When DrawGrowIcon() is called for one of the standard document window
  175. >|>>types, everything is fine, except if the window that you pass
  176. >|>>DrawGrowIcon() has its left edge off the left edge of the screen; ie,
  177. >|>>the window has been dragged so that some of its content is off to the
  178. >|>>left.  In that case, the grow icon gets drawn one pixel too low.
  179. >
  180. >I can reproduce it. SE/30, 7.0.1*.  Maybe this is strictly a 7.0.1 bug?
  181. >Anyone see it on plain 7.0?  For those trying to reproduce it, note that
  182. >you must not only put the left edge of a window off the screen, but also
  183. >cause the window's grow icon to be updated.  For instance, deactivate and
  184. >reactivate the window.
  185.  
  186. I can reproduce it-- looks like a real bug.  Check out the routine $8C2 bytes
  187. into WDEF 0.  It does an
  188. ADD.L D4,(A4) as a shorthand for adding two point values.  This doesn't work
  189. when the x-value of the point stored in D4 is negative.  I suppose it should
  190. be
  191. ADD.W D4,2(A4)
  192. SWAP D4
  193. ADD.W D4,(A4)
  194. followed by
  195. ADD.W D4,4(A4)
  196. SWAP D4
  197. ADD.W D4, 6(A4)
  198.  
  199. for the next point in the rect.
  200.  
  201. (but an object patch won't do that-- can any clever assembler hackers figure
  202. a way to do this?)
  203.  
  204. Hmm, I just checked out the Beta-4 source on the developer CD, and the bug has
  205. been there from the start.
  206. - -- 
  207. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  208. Some news readers expect "Disclaimer:" here.
  209. Just say NO to police searches and seizures.  Make them use force.
  210. (not responsible for bodily harm resulting from following above advice)
  211.  
  212. - -------------------------
  213.  
  214. From: mxmora@unix.SRI.COM (Matt Mora)
  215. Date: 4 Mar 92 17:53:59 GMT
  216. Organization: SRI International, Menlo Park, California
  217.  
  218. In article <1992Mar4.015621.18821@opusc.csd.scarolina.edu> jwwalker@opusc.csd.scarolina.edu (Jim Walker) writes:
  219.  
  220. >I can reproduce it. SE/30, 7.0.1*.  Maybe this is strictly a 7.0.1 bug?
  221. >Anyone see it on plain 7.0?  For those trying to reproduce it, note that
  222. >you must not only put the left edge of a window off the screen, but also
  223. >cause the window's grow icon to be updated.  For instance, deactivate and
  224. >reactivate the window.
  225.  
  226.  
  227. Yes I seen it on my  Mac II 7.0* apple color monitor. It looks like
  228. the bug happens only on cwindows. NCSA telnet and the finder for example
  229. show the bug but not Eudora.
  230.  
  231. Very good eyes indeed.
  232.  
  233.  
  234. Matt
  235.  
  236. - -- 
  237. ___________________________________________________________
  238. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  239. SRI International           |  my unix  mxmora@unix.sri.com
  240. ___________________________________________________________
  241.  
  242. - -------------------------
  243.  
  244. From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
  245. Date: 6 Mar 92 16:28:44 GMT
  246. Organization: University of Illinois at Urbana-Champaign
  247.  
  248. mxmora@unix.SRI.COM (Matt Mora) writes:
  249. >Yes I seen it on my  Mac II 7.0* apple color monitor. It looks like
  250. >the bug happens only on cwindows. NCSA telnet and the finder for example
  251. >show the bug but not Eudora.
  252.  
  253. Eudora doesn't show the bug because it doesn't call DrawGrowIcon, but draws
  254. the icon "by hand".  (It was easier to do that than to change the clipping
  255. region to get rid of those Stoopid(TM) lines it wants to draw over perfectly
  256. good parts of my windows.  Then out came system 7 and those funky color
  257. ones...)
  258. - -- 
  259. Steve Dorner, U of Illinois Computing Services Office
  260. Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
  261. 63141qtÑꥃÿ34959931ÀöFrom: gyenese@caen.engin.umich.edu
  262. Date: Wed, 04 Mar 92 16:42:59 EST
  263. Organization: Complete lack of organization
  264.  
  265. In article <33260@unix.SRI.COM> mxmora@unix.SRI.COM (Matt Mora) writes:
  266. >
  267. >Yes I seen it on my  Mac II 7.0* apple color monitor. It looks like
  268. >the bug happens only on cwindows. NCSA telnet and the finder for example
  269. >show the bug but not Eudora.
  270.  
  271. I see the bug happening on windows that have a horizontal scroll bar across
  272. the bottom of the window.  Programs without a horizontal scroll bar, such as
  273. ResEdit and TheNews do not exhibit this behavior.  Those with the scroll bar
  274. such as NCSA Telnet and Finder show the bug.
  275.  
  276. - --John
  277. gyenese@caen.engin.umich.edu
  278.  
  279.  
  280.  
  281. +++++++++++++++++++++++++++
  282.  
  283. From: gyenese@caen.engin.umich.edu
  284. Date: Wed, 04 Mar 92 16:42:59 EST
  285. Organization: Complete lack of organization
  286.  
  287. In article <33260@unix.SRI.COM> mxmora@unix.SRI.COM (Matt Mora) writes:
  288. >
  289. >Yes I seen it on my  Mac II 7.0* apple color monitor. It looks like
  290. >the bug happens only on cwindows. NCSA telnet and the finder for example
  291. >show the bug but not Eudora.
  292.  
  293. I see the bug happening on windows that have a horizontal scroll bar across
  294. the bottom of the window.  Programs without a horizontal scroll bar, such as
  295. ResEdit and TheNews do not exhibit this behavior.  Those with the scroll bar
  296. such as NCSA Telnet and Finder show the bug.
  297.  
  298. - --John
  299. gyenese@caen.engin.umich.edu
  300.  
  301.  
  302.  
  303. ---------------------------
  304.  
  305. From: palace@mcl.mcl.ucsb.edu (Scott Schlieman)
  306. Subject: stepping a floppy head
  307. Date: 3 Mar 92 23:28:13 GMT
  308.  
  309. I'm trying to write a small program to step the floppy disk head to a 
  310. specific sector.  Does anyone know of any low level routines that would
  311. do this?  I'm not looking for a file manager routine, as my goal is to
  312. deal directly with the drive, not with the files on it.  
  313.  
  314. Thank in advance for any help or advice.
  315.  
  316. Scott Schlieman
  317. palace@mcl.mcl.ucsb.edu
  318.  
  319. +++++++++++++++++++++++++++
  320.  
  321. From: stevec@Apple.COM (Steve Christensen)
  322. Date: 7 Mar 92 02:42:10 GMT
  323. Organization: Apple Computer Inc., Cupertino, CA
  324.  
  325. palace@mcl.mcl.ucsb.edu (Scott Schlieman) writes:
  326.  
  327. >I'm trying to write a small program to step the floppy disk head to a 
  328. >specific sector.  Does anyone know of any low level routines that would
  329. >do this?  I'm not looking for a file manager routine, as my goal is to
  330. >deal directly with the drive, not with the files on it.  
  331.  
  332. Call the floppy driver to do it since that's the standard interface for
  333. dealing with floppies...
  334.  
  335. steve
  336.  
  337. - -- 
  338. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  339.   Steve Christensen            Never hit a man with glasses.
  340.   stevec@apple.com            Hit him with a baseball bat.
  341.  
  342. ---------------------------
  343.  
  344. From: bskendig@set.Princeton.EDU (Brian Kendig)
  345. Subject: Macintosh speech recognition (was Re: Speech synthesis toolkit)
  346. Date: 4 Mar 92 03:18:30 GMT
  347. Organization: Starfleet Academy, Princeton University
  348.  
  349. In article <1954@bcstec.boeing.com> kuryakin@bcstec.boeing.com (Rick Pavek) writes:
  350. >[Monday], on Good Morning America, John Scully and one of the Apple   
  351. >Engineers (the inventor) displayed Casper, the talking computer.
  352. >The computer spoke with near human quality speech, understood spoken commands from Joan London, John and the Employee, and showed how Apple Computer intends
  353. >to develop it's product.
  354. >Looked neat as stuff.  They selected text, pasted into MacWrite, changed
  355. >the font, size and style of text, and did all kinds of things.
  356. >They indicated it was still a prototype.  Why they announced it, I don't know.
  357. >Perhaps they had it developed far enough along that they could display it
  358. >to the public and beat someone else (TI?) to it.
  359.  
  360. It really sounds impressive!  I heard a tape of the segment over the
  361. phone, so I don't know what kind of computer was running the program
  362. (I've heard rumors that it will only run on Quadras or better), but it
  363. was interpreting speech with very few problems (once or twice a
  364. command had to be repeated).  Some of the commands they gave it were:
  365.  
  366.     "Casper, open data with MacWrite Two."
  367.     "Casper, do paste."
  368.     "Casper, do select all."
  369.     "Casper, ten point bold."
  370.     "Casper, open the spreadsheet."
  371.     "Casper, pay ten dollars to the phone company."
  372.         (something like that, then the Mac would enter data in a cell)
  373.     "Casper, open my calendar."
  374.     "Casper, schedule a meeting with John Doe."  (don't remember the name)
  375. The computer said (sounded like Macintalk, not any new speech synth stuff):
  376. "When would you like to schedule a meeting?"
  377.     "Casper, Wednesday from two thirty to four thirty."
  378. The computer said:
  379. "Your meeting has been scheduled from two thirty to four thirty on Wednesday."
  380.  
  381. Joan Lunden went on to tell the machine to program her VCR (I presume
  382. they were using some dummy application).  The person who taped this
  383. for me and played it over the phone said that Joan was reading her
  384. commands off cue-cards, so it occurred to me that the system might
  385. have been done up to look good -- it would do the same sequence of
  386. actions no matter what you said to it, and it would do the next action
  387. whenever it heard someone speak -- and therefore the system might not
  388. have been so close to being finished as the segment on TV seemed to
  389. indicate, but I'm willing to believe that they've actually got
  390. something there.
  391.  
  392. They said they'd had it analyze some ungodly number of speakers to
  393. determine how different people pronounce things differently, and they
  394. fed it tens of thousands of sentences so it could learn how to pick
  395. out words from sentences.  The result of this is that the speech
  396. recognition system doesn't have to be trained for different voices --
  397. you just walk up to a computer, tell it what to do, and it does what
  398. you tell it.
  399.  
  400. They said they intended this to be a whole new interface metaphor for
  401. the Mac, and it looks like it may well be a popular one!  I know _I_'m
  402. eagerly waiting to try this one out.
  403.  
  404.      << Brian >
  405.  
  406. - -- 
  407. | Brian S. Kendig       --/\-- Tri     bskendig@phoenix.Princeton.EDU, @PUCC
  408. | Computer Science BSE  |/  \| Quad  You gave your life to become the person
  409. | Princeton University  /____\ clubs    you are right now.  Was it worth it?
  410.  
  411. - -------------------------
  412.  
  413. From: peterc@moebius.cubetech.com (Peter Creath)
  414. Date: 5 Mar 92 23:53:42 GMT
  415. Organization: Cube Technologies
  416.  
  417.  
  418. In article <1992Mar4.031830.11852@Princeton.EDU> (comp.sys.mac.programmer), bskendig@set.Princeton.EDU (Brian Kendig) writes:
  419. > In article <1954@bcstec.boeing.com> kuryakin@bcstec.boeing.com (Rick Pavek) writes:
  420. > >[Monday], on Good Morning America, John Scully and one of the Apple   
  421. > >Engineers (the inventor) displayed Casper, the talking computer.
  422. > >The computer spoke with near human quality speech, understood spoken commands from Joan London, John and the Employee, and showed how Apple Computer intends
  423. > >to develop it's product.
  424. > >Looked neat as stuff.  They selected text, pasted into MacWrite, changed
  425. > >the font, size and style of text, and did all kinds of things.
  426. > >They indicated it was still a prototype.  Why they announced it, I don't know.
  427. > >Perhaps they had it developed far enough along that they could display it
  428. > >to the public and beat someone else (TI?) to it.
  429. > It really sounds impressive!  I heard a tape of the segment over the
  430. > phone, so I don't know what kind of computer was running the program
  431. > (I've heard rumors that it will only run on Quadras or better), but it
  432. > was interpreting speech with very few problems (once or twice a
  433. > command had to be repeated).
  434.  
  435. Not to start a Mac/NeXT war, but the system was developed at Cornell(?)
  436. on a NeXT.
  437.  
  438. At least the crucial algorithm/routines.  I'm sure Apple has tweaked
  439. it quite a bit (probably did all the samples of different voices to
  440. increase its comprehension)...
  441.  
  442. - ----------------------------------------------------------------------------
  443. Peter Creath                 "When I was a boy I was told that anybody could
  444. peterc@moebius.cubetech.com   become president; I'm beginning to believe it."
  445.                                                            -- Clarence Darrow
  446.  
  447. +++++++++++++++++++++++++++
  448.  
  449. From: jcav@quads.uchicago.edu (JohnC)
  450. Date: 6 Mar 92 17:54:21 GMT
  451. Organization: The Royal Society for Putting Things on Top of Other Things
  452.  
  453. In article <dx3uv972.to455b@moebius.cubetech.com> peterc@moebius.cubetech.com (Peter Creath) writes:
  454. >Not to start a Mac/NeXT war, but the system was developed at Cornell(?)
  455. >on a NeXT.
  456. >
  457. >At least the crucial algorithm/routines.  I'm sure Apple has tweaked
  458. >it quite a bit (probably did all the samples of different voices to
  459. >increase its comprehension)...
  460.  
  461. Not exactly.  The person in charge of the Apple speech recognition project
  462. did original work on the problem for his PhD. at Carnegie/Mellon (not
  463. Cornell), using NeXT computers.  The recent NeXT speech products are based
  464. on this CMU work.  However, he's been at Apple for a while now, and I
  465. suspect he and his team haven't been sitting around merely "tweaking".
  466.  
  467. - -- 
  468. John Cavallino                  |  EMail: jcav@midway.uchicago.edu
  469. University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
  470. Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
  471. B0 f++ c+ g+ k s+(+) e+ h- pv   |         Chicago, IL  60637
  472.  
  473. ---------------------------
  474.  
  475. From: James.W.Osborne@dartmouth.edu (James W. Osborne)
  476. Subject: THINK C 5.0.2 project file bug - don't mix Systems 6 & 7
  477. Date: 4 Mar 92 20:37:17 GMT
  478. Organization: Dartmouth College, Hanover, NH
  479.  
  480. Here's something not to try at home.
  481.  
  482. Take a nice, big project- like 125 files (the size does not matter, but
  483. it helps illustrate the point).  Develop it under System 7.  Do a full
  484. build so that all of your files are compiled and up to date.
  485.   Now, boot your machine under System 6.  Do a make and click "Use
  486. Disk."
  487.   THINK C now thinks that every single file needs to be recompiled. 
  488. This happens even if you unclick the "Quick scan" option.
  489.   Now, go back to System 7 and do a make.  Click "Use Disk."  It
  490. _still_ thinks you need to recompile every single file in the project.
  491.  
  492. This is a truly horrendous problem if you are trying to develop your
  493. software to work under Systems 6 & 7.
  494.  
  495.  
  496. If I am being stupid about something, please enlighten me.
  497. - -J
  498.  
  499. - -------------------------
  500.  
  501. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  502. Date: 5 Mar 92 02:20:13 GMT
  503. Organization: Symantec Corp.
  504.  
  505. In article <1992Mar4.203717.18755@dartvax.dartmouth.edu> James.W.Osborne@dartmouth.edu (James W. Osborne) writes:
  506.  
  507.    Take a nice, big project- like 125 files (the size does not matter, but
  508.    it helps illustrate the point).  Develop it under System 7.  Do a full
  509.    build so that all of your files are compiled and up to date.
  510.      Now, boot your machine under System 6.  Do a make and click "Use
  511.    Disk."
  512.      THINK C now thinks that every single file needs to be recompiled. 
  513.    This happens even if you unclick the "Quick scan" option.
  514.      Now, go back to System 7 and do a make.  Click "Use Disk."  It
  515.    _still_ thinks you need to recompile every single file in the project.
  516.  
  517. I don't know why this problem occurs, but you can work around it by
  518. clicking in the check column next to your source files in the Make
  519. dialog box. This is kind of like using "touch" on UNIX; THINK C will
  520. trust your judgement as to which files really need to be compiled. To
  521. quickly deselect (or select) all of your files, option-click on the
  522. check column.
  523.  
  524. Perhaps the problem with switching between 6 and 7 involves a change
  525. in time zones (stored in the System file?), and therefore file dates.
  526. This info should be stored in PRAM, but I'm not sure -- try checking
  527. the MAP cdev on both to see what you get.
  528.  
  529.     -phil
  530. - --
  531.    Phil Shapiro                                   Software Engineer
  532.    Language Products Group                     Symantec Corporation
  533.            Internet: phils@cs.brandeis.edu
  534.  
  535. ---------------------------
  536.  
  537. From: johnsone@uxh.cso.uiuc.edu (Erik A. Johnson)
  538. Subject: CMaster extension to THINK C
  539. Organization: University of Illinois at Urbana
  540. Date: Thu, 5 Mar 1992 02:13:18 GMT
  541.  
  542. I posted a note here giving an e-mail address for Jersey Scientific,
  543. the company that sells the CMaster extension to THINK C.
  544.  
  545. If you want more info about CMaster and send e-mail to Jersey Scientific
  546. (jersci@applelink.apple.com), PLEASE include your USMail address in your
  547. e-mail so that they can send you the necessary information/documentation.
  548.  
  549. (Note: it apparently costs them $$$ to send e-mail from applelink, so
  550. they would appreciate it if you could help them out by sending your
  551. USMail address.)
  552.  
  553. Thanks!
  554.  
  555. (Standard disclaimer:  I have no direct connection with Jersey Scientific
  556. other than being a satisfied CMaster customer!  And as for the AAE dept
  557. at UIUC -- of course I don't speak for them, I'm just a Grad student :-)
  558.  
  559.  
  560. Erik A. Johnson        \    Internet: johnsone@uxh.cso.uiuc.edu     \       |
  561. - ------------------------\    AmericaOnline: ErikAJ                   \    --+--
  562. Graduate Student         \--------------------------------------------\     |
  563. Aero/Astro Engineering    \  "Jesus said to him, 'I am the way, and    \    |
  564. University of Illinois at  \  the truth, and the life; no one comes to  \   |
  565.    Urbana-Champaign (UIUC)  \  the Father except through me.'" (Jn14:6)  \
  566.  
  567. - -------------------------
  568.  
  569. From: johnsone@uxh.cso.uiuc.edu (Erik A. Johnson)
  570. Organization: University of Illinois at Urbana
  571. Date: Thu, 5 Mar 1992 20:00:29 GMT
  572.  
  573. johnsone@uxh.cso.uiuc.edu (Erik A. Johnson) writes:
  574. >If you want more info about CMaster and send e-mail to Jersey Scientific
  575. >(jersci@applelink.apple.com), PLEASE include your USMail address in your
  576. >e-mail so that they can send you the necessary information/documentation.
  577.  
  578. I've had a couple people ask me about the CMaster package I mentioned,
  579. so I thought I'd post a more thorough explanation of what it is and
  580. what it does.
  581.  
  582. First of all, CMaster installs (when you install the package) a couple
  583. of resources into THINK C and modifies two others in order to patch
  584. itself into THINK C when a project opens (including a new WDEF and a
  585. couple of code resources).  It patches a couple of system routines
  586. (e.g. GetNextEvent/WaitNextEvent) and a couple of THINK C routines --
  587. all of this so that CMaster sees Events before THINK C and can modify
  588. or handle them first.  The bulk of CMaster is stored in a file in the
  589. System Folder, along with a prefs file, and is loaded in as necessary.
  590.  
  591. Basically, CMaster is an extension to THINK C, adding a number of
  592. editing capabilities that are (in my opinion) quite useful to the
  593. programmer.
  594.  
  595. When you open up a file (source or headers), you get a window that is
  596. somewhat modified from the standard editor window.  There CMaster puts a
  597. row of clickable icons down the left side of the window (each performs a
  598. different function -- more on this later), the title bar is modified to have
  599. one or more popup menus, and one menu (called, not surprisingly, "CMaster")
  600. is added to the menuBar.
  601.  
  602. The icons along the left edge of the window perform a number of functions,
  603. including:
  604.  
  605.   - forward/reverse searches
  606.   - commenting/uncommenting the selected text (or, if a user-definable
  607.     modifier key is pressed, inserting/removing #ifdef/#endif around the
  608.     selected text)
  609.   - multiple clipboards, each of which can be a first-in-first-out stack
  610.     (and can be modifier-clicked to show what is in the clipboard)
  611.   - several markers (allows you to mark a location in your code by clicking
  612.     on the icon and return to it later by clicking in the lower half of the
  613.     icon later -- on a mouseDown for longer than some definable number of
  614.     ticks, this icon will show the context of the mark)
  615.   - produce function prototypes of all of the functions within the current
  616.     selection (or the whole file if no selection), pushing the prototypes
  617.     onto the clipboard for pasting wherever you want
  618.   - scroll the window until the cursor is at the {top,middle,bottom} of the
  619.     screen OR with a modifier key, go to {top,middle,bottom} of the file
  620.     (with command key) or the current function (with option key).
  621.  
  622. The menus that are available to be put on the window's title bar are:
  623.  
  624.   - C -- the same as the CMaster menu put in the main menubar
  625.   - Actions -- menu equivalents to the icons
  626.   - Markers -- a list of all of the C functions in the file, lines
  627.                beginning with "#pragma mark", and any THINK C 5.0 marks
  628.                (listed in the order in the file, or, with a modifier key,
  629.                in alphabetical order); selecting one of these items jumps
  630.                directly to that function, line or marker
  631.   - Files -- a list of all #included files (don't need a modifier key)
  632.  
  633. The CMaster menu has several items that put up dialog windows to modify
  634. CMasters actions, including which icons to show, which menus to use, etc.
  635. Furthermore, CMaster has user-definable key-equivalents to all of its
  636. functions and to some of those of THINK C and to some other functions
  637. (e.g. forward character delete, line join, etc.).
  638.  
  639. Some other functions that I've gotten very used to having (i.e. I would
  640. be frustrated if I had to go back to programming without them) are:
  641.  
  642.   - "Kissing" -- when you type a right {parenthesis,bracket,brace},
  643.     CMaster briefly highlights the matching left {parenthesis,bracket,brace}
  644.     or beeping if it cannot find the matching one (this is definable --
  645.     you can turn off any of ')', ']', or '}', and the beeping function).
  646.   - Window location memory using the same resource ('MPSR' # 1005) that
  647.     MPW uses (also includes the position of the scrolling of the file and
  648.     the current selection).  CMaster allows you to use, ignore, or
  649.     selectively use this info.
  650.   - CMaster includes a "SnapBack" function -- if you use the Marker menu
  651.     or THINK C's "Find..." to go to another part of your file (such that
  652.     the old selection point is off the screen), then the Enter key will
  653.     SnapBack to your old insertion point.
  654.   - "Animated Thumb" -- the thumb of the scroll-bar allows you to scan
  655.     through the file in real-time as you drag the thumb.
  656.   - THINK C's double-click selects an alphanumeric word.  CMaster modifies
  657.     this so that if it is a CONTROL-double-click, it uses more of a C
  658.     oriented definition of "word"; for example, a CONTROL-double-click on
  659.     either "foo" or "bar" of "foo[0]->bar" would select the whole string.
  660.   - a 'vers' editor (it assumes you use the convention of naming your
  661.     project's resource file as projectname.rsrc) to create and modify
  662.     both ID 0 and ID 1 'vers' version resources.
  663.  
  664.  
  665. Well, this is a summary of CMaster.  On a more subjective level, I have
  666. found it very useful, especially the prototype generator (with THINK C 5.0
  667. having the option of requiring prototypes, it is WONDERFUL to be able to
  668. quickly generate the prototypes of all the functions in a source file),
  669. and the {[(-kissing feature (highlighting the matching left one, beep if
  670. you forgot to put one in :-).  And the Markers menu is invaluable --
  671. especially in debugging code -- it has saved me much time being able to
  672. jump directly from one function to another without the necessity of
  673. searching for functions in long source files.
  674.  
  675. Oh, the last price I heard was $69.95 (but that was some time ago, so
  676. don't hold me to it).  Address, phone number, etc., for Jersey Scientific:
  677.  
  678.    Jersey Scientific, Inc.
  679.    545 Eighth Ave., 19th Floor
  680.    New York, NY 10018
  681.  
  682.    (212) 736-0406
  683.    FAX: (212) 947-4981
  684.    e-mail:   Applelink:  jersci
  685.           Internet:  jersci@applelink.apple.com
  686.         Compuserve:  70400,3361
  687.  
  688.  
  689. If you send e-mail to them, include your USMail address in your e-mail so
  690. that they can send you whatever info you need.  (Apparently it costs them
  691. $$$ to send stuff from Applelink.)
  692.  
  693.  
  694. (Standard disclaimer:  I have no connection with Jersey Scientific other than
  695. being a satisfied CMaster customer.   And as for the AAE Dept of UIUC or the
  696. UIUC in general ... I'm just a grad student ... they hardly know I exist. :-)
  697.  
  698.  
  699. Erik A. Johnson        \    Internet: johnsone@uxh.cso.uiuc.edu     \       |
  700. - ------------------------\    AmericaOnline: ErikAJ                   \    --+--
  701. Graduate Student         \--------------------------------------------\     |
  702. Aero/Astro Engineering    \  "Jesus said to him, 'I am the way, and    \    |
  703. University of Illinois at  \  the truth, and the life; no one comes to  \   |
  704.    Urbana-Champaign (UIUC)  \  the Father except through me.'" (Jn14:6)  \
  705.  
  706. ---------------------------
  707.  
  708. From: synge@seasid.enet.dec.com (James M Synge)
  709. Subject: Think C Q: Mixing SF dialog and ANSI file IO
  710. Organization: Digital Equipment Corporation
  711. Date:  4 MAR 92 17:50:59    
  712.  
  713. I'm using TCL to write a program on the Mac, but I also want the text
  714. file IO to be the same as that I use on other systems.  So I'm looking
  715. for a way to take the results of the standard file dialog box and
  716. pass it to the stdio package in Think C's ANSI library.
  717.  
  718. Has anybody done this?  Or got any suggestions?  Example code would
  719. be most helpful.
  720.  
  721. James
  722.  
  723. - -------------------------
  724.  
  725. From: e-sink@uiuc.edu (Eric W. Sink)
  726. Organization: University of Illinois at Urbana-Champaign
  727. Date: Thu, 5 Mar 1992 15:17:08 GMT
  728.  
  729. In <1992Mar5.015248.18828@PA.dec.com> synge@seasid.enet.dec.com (James M Synge) writes:
  730.  
  731. >I'm using TCL to write a program on the Mac, but I also want the text
  732. >file IO to be the same as that I use on other systems.  So I'm looking
  733. >for a way to take the results of the standard file dialog box and
  734. >pass it to the stdio package in Think C's ANSI library.
  735.  
  736. >Has anybody done this?  Or got any suggestions?  Example code would
  737. >be most helpful.
  738.  
  739. I have a little routine I call fopenMAC() which I find very useful.
  740. It looks vaguely like this:
  741.  
  742. - -----
  743. #include <stdio.h>
  744.  
  745. FILE *fopenMAC(char *name,short volNum,long dirID,char *perm)
  746. {
  747.   Str255 fullName;
  748.  
  749.   GetFullPathName(name,volNum,dirID,fullName);
  750.  
  751.   p2cstr(fullName);
  752.   return fopen(fullName,perm);
  753. }
  754.  
  755. GetFullPathName() is roughly the same routine that appears in the
  756. StandardFile sample code (the older one).  Then...
  757.  
  758.  
  759. FILE *
  760. CMySubclassOfCDataFile::StdOpen(char *perm)
  761. {
  762.   return fopenMAC(name,volNum,dirID,perm);
  763. }
  764.  
  765. - -- 
  766. Eric W. Sink,  Spatial Analysis and Systems Team
  767. USACERL, P.O. Box 9005, Champaign, IL 61826-9005
  768. 1-800-USA-CERL x449,   e-sink@uiuc.edu
  769.  
  770. ---------------------------
  771.  
  772. From: stevew@darkwing.uoregon.edu (Steve Wynne x6-1718)
  773. Subject: Window Storage?
  774. Organization: /home/darkwing/stevew/.organization
  775. Date: 5 Mar 92 00:25:00
  776.  
  777. Hi folks.
  778.  
  779. I read about declaring a WindowRecord for the storage of a window in
  780. the GetNewWindow(rsrcID, @wRecord, POINTER(-1)) style. 
  781.  
  782. But all I see for examples in multiple window systems pass NIL so that
  783. a window will be put on the heap. Now I don't want to fragment my heap
  784. too much, but at the same time, I'm not sure I can manage the problems
  785. of a relocatable handle to a window. Am I speaking gibberish?
  786.  
  787. Thanks!
  788.  
  789. - -------------------------
  790.  
  791. From: jcav@quads.uchicago.edu (JohnC)
  792. Organization: The Royal Society for Putting Things on Top of Other Things
  793. Date: Thu, 5 Mar 1992 19:00:44 GMT
  794.  
  795. In article <STEVEW.92Mar5002500@darkwing.uoregon.edu> stevew@darkwing.uoregon.edu (Steve Wynne x6-1718) writes:
  796. >I read about declaring a WindowRecord for the storage of a window in
  797. >the GetNewWindow(rsrcID, @wRecord, POINTER(-1)) style. 
  798. >
  799. >But all I see for examples in multiple window systems pass NIL so that
  800. >a window will be put on the heap. Now I don't want to fragment my heap
  801. >too much, but at the same time, I'm not sure I can manage the problems
  802. >of a relocatable handle to a window. Am I speaking gibberish?
  803.       ^^^^^^^^^^^^^^^^^^
  804. There are certain OS data structures that the system assumes will never
  805. move.  GrafPorts/WindowRecords/DialogRecords are the most important.  Never
  806. ever ever put any such structures into relocatable memory.
  807.  
  808. The way I eliminate fragmentation when I need to allocate window records
  809. or other non-relocatable structures that must outlive a single stackframe
  810. is to allocate a bunch of them at a time.  Here's the code I use (there's
  811. not much of it and it's pretty simple, so I'll include it all):
  812.  
  813.  
  814.  
  815. UNIT UFixedStorage;
  816. { This unit provides routines for allocating non-relocatable memory blocks }
  817. { in way that minimizes heap fragmentation.  It is designed for situations }
  818. { where multiple blocks of identical size (grafPorts, in particular) will }
  819. { be allocated and released at unpredictable intervals. }
  820. { --uses no A5 globals }
  821. INTERFACE
  822. { ------------------------------------------------------------------------ }
  823.  USES
  824. {$IFC NOT THINK_PASCAL}
  825.   Types, Memory;
  826. {$ENDC}
  827.  
  828. { ------------------------------------------------------------------------ }
  829.  FUNCTION AllocateClump (refNum: longint): OSErr;
  830.  FUNCTION MakeBlockList (blockSize: longint; clumpSize: integer;
  831.             VAR refNum: longint): OSErr;
  832.  FUNCTION GetBlock (refNum: longint; VAR theBlock: ptr): OSErr;
  833.  FUNCTION ReleaseBlock (refNum: longint; theBlock: ptr): OSErr;
  834.  
  835. { ------------------------------------------------------------------------ }
  836. IMPLEMENTATION
  837.  TYPE
  838.   LongPtr = ^longint;
  839.  
  840.   BlockListPtr = ^BlockList;
  841.   BlockList = RECORD
  842.     firstFree: LongPtr;    { address of first unused block, or nil if none }
  843.     blockSize: longint;    { bytes per block }
  844.     clumpSize: longint;    { bytes per clump }
  845.     clumpBlocks: integer; { blocks per clump }
  846.    END; { BlockList = record }
  847.  
  848.  
  849. { ------------------------------------------------------------------------ }
  850.  FUNCTION AllocateClump (refNum: longint): OSErr;
  851.   VAR
  852.    thisBlk: LongPtr;
  853.    theClump: Ptr;
  854.    i: integer;
  855.    err: OSErr;
  856.  BEGIN
  857.   theClump := NewPtrClear(BlockListPtr(refNum)^.clumpSize);
  858.   err := MemError;
  859.   IF (err = noErr) THEN
  860.    BEGIN { clump was successfully allocated }
  861.     thisBlk := LongPtr(theClump);
  862.     FOR i := 1 TO BlockListPtr(refNum)^.clumpBlocks - 1 DO
  863.      BEGIN
  864.       thisBlk^ := longint(thisBlk) + BlockListPtr(refNum)^.blockSize;
  865.       thisBlk := LongPtr(thisBlk^);
  866.      END;
  867.     thisBlk^ := longint(BlockListPtr(refNum)^.firstFree);
  868.     BlockListPtr(refNum)^.firstFree := LongPtr(theClump);
  869.    END; { clump was successfully allocated }
  870.   AllocateClump := err;
  871.  END; { function AllocateClump }
  872.  
  873.  FUNCTION MakeBlockList (blockSize: longint; clumpSize: integer;
  874.             VAR refNum: longint): OSErr;
  875.   VAR
  876.    err: OSErr;
  877.    bl: BlockListPtr;
  878.  BEGIN
  879.   bl := BlockListPtr(NewPtr(SIZEOF(BlockList)));
  880.   err := MemError;
  881.   IF (err = noErr) THEN
  882.    BEGIN { list control block was created }
  883.     IF BAND(blockSize, $FFFFFFFC) <> blockSize THEN
  884.      blockSize := BAND(value, $FFFFFFFC) + 4;  { long-word alignment }
  885.     IF clumpSize < 1 THEN
  886.      clumpSize := 1;        { sanity check }
  887.     bl^.firstFree := NIL;    { no blocks until they are needed }
  888.     bl^.blockSize := blockSize;
  889.     bl^.clumpSize := (blockSize * clumpSize);
  890.     bl^.clumpBlocks := clumpSize;
  891.     refNum := longint(bl);
  892.    END; { list control block was created }
  893.   MakeBlockList := err;
  894.  END; { function MakeBlockList }
  895.  
  896.  FUNCTION GetBlock (refNum: longint; VAR theBlock: ptr): OSErr;
  897.   VAR
  898.    err: OSErr;
  899.  BEGIN
  900.   err := noErr;
  901.   theBlock := pointer(BlockListPtr(refNum)^.firstFree);    { get pointer to }
  902.                             { first unused block }
  903.   IF theBlock = NIL THEN
  904.    BEGIN { need to allocate more blocks }
  905.     err := AllocateClump(refNum);
  906.     IF err = noErr THEN
  907.      theBlock := pointer(BlockListPtr(refNum)^.firstFree);
  908.    END; { need to allocate more blocks }
  909.   IF (theBlock <> NIL) THEN
  910.    BEGIN
  911.     BlockListPtr(refNum)^.firstFree := LongPtr(LongPtr(theBlock)^);
  912.     LongPtr(theBlock)^ := 0;    { disconnect from the block list }
  913.    END;
  914.   GetBlock := err;
  915.  END; { function GetBlock }
  916.  
  917.  FUNCTION ReleaseBlock (refNum: longint; theBlock: ptr): OSErr;
  918. { someday maybe check that block belongs to the list? }
  919.  BEGIN
  920.   LongPtr(theBlock)^ := longint(BlockListPtr(refNum)^.firstFree);
  921.   BlockListPtr(refNum)^.firstFree := LongPtr(theBlock);
  922.   ReleaseBlock := noErr;
  923.  END; { procedure ReleaseBlock }
  924.  
  925. { ------------------------------------------------------------------------ }
  926. END. { UNIT UFixedStorage }
  927.  
  928.  
  929. - -- 
  930. John Cavallino                  |  EMail: jcav@midway.uchicago.edu
  931. University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
  932. Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
  933. B0 f++ c+ g+ k s+(+) e+ h- pv   |         Chicago, IL  60637
  934.  
  935. ---------------------------
  936.  
  937. From: bakker@fwi.uva.nl (Harry Bakker (I87))
  938. Subject: Floating windows: How to implement? PLEASE HELP!
  939. Date: 5 Mar 92 14:07:07 GMT
  940. Organization: FWI, University of Amsterdam
  941.  
  942. I'm a student who's programming the Mac for some time now, using THINK C 5.0.
  943. I am currently writing an application that needs to use the
  944. 'toolbox' concept. Just like MacPaint, you can tear-off the tools menu
  945. that acts like a window after that. This window behaves a little different
  946. from conventional windows, because whatever you do, which window you select,
  947. the toolswindow always stays in front of all others.
  948. Now I have picked up somewhere that the name for those kind of windows is
  949. 'floating window', and that you can implement them by always placing them in
  950. the first position of the windowlist.
  951. Unfortunately, this is a little too less information for me to implement
  952. them. Is there somebody out there who can help me with this problem? 
  953. I will be looking for replies via News.
  954.  
  955. Thanks everyone.
  956.  
  957. H.G.Bakker
  958. Bommerscroft 13
  959. 1902 BG  Castricum
  960. The Netherlands
  961.  
  962. - -------------------------
  963.  
  964. From: Daryl_Spitzer@mindlink.bc.ca (Daryl Spitzer)
  965. Date: 5 Mar 92 16:14:12 GMT
  966. Organization: MIND LINK! - British Columbia, Canada
  967.  
  968. If you're using TCL, look at the Art Class demo, and the classes CTearChore,
  969. CTearOffMenu, CGridSelector, CSelectorMDEF, etc.  (In fact, even if you're not
  970. using TCL, the code in these classes could be quite useful to you.)
  971. - --
  972. - -------------------------------------------------------------------
  973.  Daryl_Spitzer@mindlink.bc.ca     "Life isn't just, life just is."
  974.          a2251@mindlink.bc.ca              -- Me  (I think.)
  975.        Spitzer@UNCAMULT.BITNET
  976. - -------------------------------------------------------------------
  977.  
  978. ---------------------------
  979.  
  980. From: speth@cats.ucsc.edu (James Gustave)
  981. Subject: Advice for flickering text??
  982. Date: 5 Mar 92 19:12:45 GMT
  983. Organization: University of California, Santa Cruz
  984.  
  985.  
  986. I've got a question about reducing text flicker...
  987. My program is showing a continuously changing stream of data in a window,
  988. and I'm using DrawChar in Think C to write to the window.  Everytime it's
  989. updated it flickers... is there some way to reduce this?
  990. Is there a more efficient way of drawing to a window?
  991.  
  992. Also, I have a more general question about the style of the interface...
  993. the data I'm displaying has 9 fields, each of which changes over time,
  994. does it follow the interface guidelines to display these values in a window,
  995. or would it be more standard to show them in a dialog?
  996.  
  997. This is my first REAL mac program, so I'm very excited about it.
  998. Please help!  Thanks,
  999.  
  1000.  
  1001. - -- 
  1002. - --
  1003. Jim Speth
  1004. speth@cats.ucsc.edu
  1005.  
  1006. - -------------------------
  1007.  
  1008. From: wwg2101@summa.tamu.edu (GILPIN, W.W.)
  1009. Date: 5 Mar 92 22:16:00 GMT
  1010. Organization: Texas A&M University, Academic Computing Services
  1011.  
  1012. >I've got a question about reducing text flicker...
  1013. >My program is showing a continuously changing stream of data in a window,
  1014. >and I'm using DrawChar in Think C to write to the window.  Everytime it's
  1015. >updated it flickers... is there some way to reduce this?
  1016. >Is there a more efficient way of drawing to a window?
  1017.  
  1018. If you can(depends on what you're writing to the window), you should try to
  1019. use DrawStr, rather than DrawChar. It makes a noticeable difference. If your
  1020. data is coming in character by character, however, DrawStr won't help, unless
  1021. you buffer chunks of your data then DrawStr those chunks to the window.
  1022.  
  1023. Wes Gilpin
  1024. WWG2101@TAMZEUS
  1025. WWG2101@ZEUS.TAMU.EDU
  1026.  
  1027. - -------------------------
  1028.  
  1029. From: lippin@phnom-penh.berkeley.edu (The Apathist)
  1030. Date: 6 Mar 92 01:46:06 GMT
  1031. Organization: Authorized Service, Incorporated
  1032.  
  1033. The key to avoiding flicker is to avoid erasing, and especially to
  1034. avoid erasing newly drawn items.
  1035.  
  1036. When you can avoid drawing altogether, do so -- check to see if your
  1037. data has changed before redrawing it.
  1038.  
  1039. If you're drawing new text over old, use srcCopy mode rather than
  1040. srcOr.  Then you only have to erase the part of the old line that
  1041. extended beyond the new one.  (IM I says you can't use some drawing
  1042. modes with text, but that restriction is lifted in IM IV.)
  1043.  
  1044. If you're scrolling text, you may be getting flicker on the bottom
  1045. line -- this comes from drawing a line and immediately scrolling it
  1046. up.  Instead, don't scroll the display until the next line of text is
  1047. ready to draw.  If the time between lines is so short that it still
  1048. flickers, you should consider lowering your sampling rate -- no one
  1049. can read that fast anyway.
  1050.  
  1051. If you still have problems with a shearing flicker, synchronizing with
  1052. the vertical retrace can help.  On macs with a built in display, draw
  1053. right after TickCount changes; on slotted macs you'll need a slot VBL
  1054. task to provide a tickcount synchronized with the monitor.  This gets
  1055. a little hairy on multiple monitors.
  1056.  
  1057. Finally, when you start dealing with graphics, remember the same rules
  1058. apply.  A little cleverness with regions, offscreen bitmaps, and/or
  1059. xor modes can really improve the appearance of a program.
  1060.  
  1061.                     --Tom Lippincott
  1062.                       lippin@math.berkeley.edu
  1063.  
  1064.     "Overhead, without any fuss, the stars were going out."
  1065.                     --Arthur C. Clarke,
  1066.                      _The Nine Billion Names of God_
  1067.  
  1068. - -------------------------
  1069.  
  1070. From: russotto@eng.umd.edu (Matthew T. Russotto)
  1071. Date: 6 Mar 92 04:08:26 GMT
  1072. Organization: College of Engineering, University of Maryland, College Park
  1073.  
  1074. In article <5MAR199217164194@summa.tamu.edu> wwg2101@summa.tamu.edu (GILPIN, W.W.) writes:
  1075. >>I've got a question about reducing text flicker...
  1076. >>My program is showing a continuously changing stream of data in a window,
  1077. >>and I'm using DrawChar in Think C to write to the window.  Everytime it's
  1078. >>updated it flickers... is there some way to reduce this?
  1079. >>Is there a more efficient way of drawing to a window?
  1080. >
  1081. >If you can(depends on what you're writing to the window), you should try to
  1082. >use DrawStr, rather than DrawChar. It makes a noticeable difference. If your
  1083. >data is coming in character by character, however, DrawStr won't help, unless
  1084. >you buffer chunks of your data then DrawStr those chunks to the window.
  1085.  
  1086. If you can suffer the speed loss, you can set up a small offscreen
  1087. port, draw the text to that, and copybits that to the screen.  That
  1088. will stop the flicker.
  1089.  
  1090. - -- 
  1091. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  1092. Some news readers expect "Disclaimer:" here.
  1093. Just say NO to police searches and seizures.  Make them use force.
  1094. (not responsible for bodily harm resulting from following above advice)
  1095.  
  1096. +++++++++++++++++++++++++++
  1097.  
  1098. From: speth@cats.ucsc.edu (James Gustave)
  1099. Date: 6 Mar 92 19:13:36 GMT
  1100. Organization: University of California, Santa Cruz
  1101.  
  1102.  
  1103. You gave me a lot to think about!  Thanks.
  1104. I think changing the mode sounds like it will help the most.
  1105.  
  1106.  
  1107. - -- 
  1108. Jim Speth
  1109. speth@cats.ucsc.edu
  1110.  
  1111. ---------------------------
  1112.  
  1113. End of C.S.M.P. Digest
  1114. **********************
  1115.